package com.fifth.order.controller;

import com.fifth.common.pojo.dto.CommonResult;
import com.fifth.order.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @作者：刘壬杉
 * @创建时间 2022/9/11 11:03
 **/
@RestController
@RequestMapping("order/stock")
public class StockController {
    @Autowired
    private StockService stockService;

    @PostMapping("getStock/{goodid}")
    public CommonResult getStock(@PathVariable String goodid){
        return stockService.getStock(goodid);
    }
}
